home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / samples / Multimedia / DirectShow_WinXP / VMR / VMRXcl / Utils.h < prev    next >
C/C++ Source or Header  |  2001-10-08  |  3KB  |  71 lines

  1. //----------------------------------------------------------------------------
  2. //  File:   Utils.h
  3. //
  4. //  Desc:   DirectShow sample code
  5. //          Prototypes for external (global) utilities 
  6. //          specific for VMRXcl app
  7. //
  8. //  Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
  9. //----------------------------------------------------------------------------
  10.  
  11. // global headers
  12. #if !defined(UTILS_H)
  13. #define UTILS_H
  14.  
  15. // helper function prototypes
  16.  
  17. DWORD MyMessage(char *sQuestion, char *sTitle);
  18. const char * hresultNameLookup(HRESULT hres);
  19. bool MySleep(DWORD  dwTime = 2500);
  20.  
  21. void ReportPixelFormat( DDPIXELFORMAT ddpf);
  22. void ReportDDSCAPS2( DDSCAPS2 ddscaps );
  23. void ReportDDrawSurfDesc( DDSURFACEDESC2 ddsd);
  24. void PixelFormatHelper( DWORD dwFlags, char * pszFlags);
  25. void SurfaceDescHelper( DWORD dwFlags, char * pszFlags );
  26.  
  27. //----------------------------------------------------------------------------
  28. //  SceneSettings
  29. //  
  30. //  This structure defines demonstration settings
  31. //----------------------------------------------------------------------------
  32. struct SceneSettings
  33. {
  34.     bool    bRotateZ;           // rotate around Z axis if true
  35.     int     nGradZ;             // angle of rotation around Z axis, in grades
  36.                                 // this is a 'time' variable for Z-rotation effect
  37.     bool    bRotateY;           // rotate around Y axis if true
  38.     int     nGradY;             // angle of rotation around Y axis, in grades
  39.                                 // this is a 'time' variable for Y-rotation effect
  40.     bool    bShowStatistics;    // show FPS in the upper right corner if true
  41.     bool    bShowTwist;         // show "twist" effect if true; THIS STATE OVERRIDES bRotateZ AND bRotateY
  42.     int     nDy;                // vertical offset for the twist effect
  43.                                 // this is a 'time' variable for "twist" effect
  44.     bool    bShowHelp;          // show text help hints if true (it is activated by right click on the control)
  45.     int     nXHelp;             // coordinates for text help hint
  46.     int     nYHelp;
  47.     TCHAR   achHelp[MAX_PATH];  // help hint text
  48.     TCHAR   achFPS[MAX_PATH];   // string representation of FramesPerSecons 
  49.                                 // (when bShowStatistics is on)
  50.  
  51.     SceneSettings() // constructor: no effects by default
  52.     {
  53.         bRotateZ = false;
  54.         nGradZ = 0;
  55.         bRotateY = false;
  56.         nGradY = 0;
  57.         bShowStatistics = false;
  58.         bShowTwist = false;
  59.         nDy = 0;
  60.         bShowHelp = 0;
  61.         nXHelp = 0;
  62.         nYHelp = 0;
  63.         lstrcpy(achHelp, TEXT(""));
  64.     };
  65.  
  66.     ~SceneSettings()
  67.     {
  68.     };
  69. };
  70.  
  71. #endif